using System.Collections;
using UnityEngine;
using UnityEngine.UI;

public class SelectMapManager : MonoBehaviour
{
	public static SelectMapManager Instance;

	public Transform btnMaps;

	private ButtonChooseMap[] btnsChooseMap;

	public Text txtCoin;

	public Sprite[] imgMaps;

	public string[] nameMaps;

	public int[] prices;

	public GameObject status;

	public Text textStatus;

	private int count;

	private void Awake()
	{
		Instance = this;
		count = btnMaps.childCount;
		btnsChooseMap = new ButtonChooseMap[count];
		for (int i = 0; i < count; i++)
		{
			btnsChooseMap[i] = btnMaps.GetChild(i).GetComponent<ButtonChooseMap>();
			btnsChooseMap[i].SetImageMap(imgMaps[i]);
			btnsChooseMap[i].key = nameMaps[i];
			btnsChooseMap[i].price = prices[i];
			btnsChooseMap[i].indexMap = i;
			btnsChooseMap[i]._Start();
		}
	}

	private void Start()
	{
		SetTextCoin();
	}

	public void SetTextCoin()
	{
		txtCoin.text = string.Concat(CoinManager.coin);
	}

	private void Update()
	{
		txtCoin.text = string.Concat(CoinManager.coin);
	}

	private IEnumerator delayCheckStatus()
	{
		yield return new WaitForSecondsRealtime(1f);
		checkStatus();
	}

	public void checkStatus()
	{
	}
}
